package mybox.engine.linefollower;

import java.awt.Polygon;
import java.util.ArrayList;

import mybox.engine.QVector;
import mybox.engine.csv.PolyFromBasic;

public class Course {
	
	public Course() {	
	}
	
	public static void dummy() {
		System.out.println("dummy");
	}
	
	public static ArrayList<Polygon> setupCourse(int intFactor, double schrittweite) throws Exception {
		
			
			ArrayList<Polygon> polygonList = new ArrayList<Polygon>();			
			
			polygonList.add(PolyFromBasic.sectorFactory(new QVector(0,0), new QVector(250,0), new QVector(0,250), schrittweite, intFactor, 1));	
			polygonList.add(PolyFromBasic.sectorFactory(new QVector(0,500), new QVector(0,250), new QVector(-250,500), schrittweite, intFactor, -1));				
			polygonList.add(PolyFromBasic.lineFactory(new QVector(-250,500),new QVector(-250,1000), intFactor));
			polygonList.add(PolyFromBasic.lineFactory(new QVector(-250,1000),new QVector(0,1250), intFactor));
			polygonList.add(PolyFromBasic.sectorFactory(
					new QVector(0,1175), new QVector(0,1250), new QVector(73.8606,1188.0236), schrittweite, intFactor, -1));
			polygonList.add(PolyFromBasic.sectorFactory(
					new QVector(147.7212,1201.0472), 
					new QVector(73.8606,1188.0236), 
					new QVector(212.6731,1163.5472), schrittweite, intFactor, 1));
			polygonList.add(PolyFromBasic.sectorFactory(
					new QVector(147.7212,1201.0472), 
					new QVector(212.6731,1163.5472), 
					new QVector(171.3608,1272.2242), schrittweite, intFactor, 1));
			polygonList.add(PolyFromBasic.sectorFactory(
					new QVector(195,1343.4012), 
					new QVector(171.3608,1272.2242), 
					new QVector(164.6966,1412.0064), schrittweite, intFactor, -1));	
			polygonList.add(PolyFromBasic.sectorFactory(
					new QVector(161.964,1500), 
					new QVector(164.6966,1412.0064), 
					new QVector(250,1500), schrittweite, intFactor, 1));	
			polygonList.add(PolyFromBasic.sectorFactory(
					new QVector(500,1500), 
					new QVector(250,1500), 
					new QVector(750,1500), schrittweite, intFactor, -1));
			polygonList.add(PolyFromBasic.lineFactory(new QVector(750,1500),new QVector(750,1000), intFactor));
			polygonList.add(PolyFromBasic.sectorFactory(
					new QVector(500,1000), 
					new QVector(750,1000), 
					new QVector(671.5891,818.1837), schrittweite, intFactor, -1));			
			polygonList.add(PolyFromBasic.sectorFactory(
					new QVector(723.0659,763.6388), 
					new QVector(671.5891,818.1837), 
					new QVector(710.0908,689.7092), schrittweite, intFactor, 1));			
			polygonList.add(PolyFromBasic.sectorFactory(
					new QVector(635.2962,574.9221), 
					new QVector(710.0908,689.7092), 
					new QVector(750,500), schrittweite, intFactor, -1));			
			polygonList.add(PolyFromBasic.lineFactory(new QVector(750,500),new QVector(750,0), intFactor));
			
			
			return polygonList;
			
		}
	
	

}
